#ifndef _FLAG_H_
#define _FLAG_H_

#include "BitFlag.h" 

/*
	class : Flag
	desc : This class is used to provide an interface for accessing
		and indexing flags. This is a fully volatile class and 
		should only be used for creating flags. It is compatible
		with bit flag which has the same interface as bit pointer
		to make life easier
*/
class Flag
{
	private:
		volatile unsigned char flag;
	public:
		Flag();
		//sets the value of flag
		void set(unsigned char f) volatile;
		//gets the value of flag.
		unsigned char get() volatile;

		//gets a pointer to a bit of the flag.
		BitFlag getBit(unsigned char bit) volatile;
		//convience operator for getting and setting 
		//the values of bits of a flag.
		BitFlag operator[](unsigned int index) volatile;

		//assignment operator
		Flag& operator=(const Flag& f) volatile;
};



#endif
